﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using CucumberJwt.Application.Authorization.Audit.Service;
using EntityFrameworkCore;
using FrameworkCore.Dependency;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.EntityFrameworkCore;
using WebApi.CustomAttribute;
using WebApi.Filter;

namespace WebApi.Controllers.v2
{
    [ApiController]

    [CustomRoute("v2")]
    public class DefaultController : Controller
    {


        //public override void OnActionExecuted(ActionExecutedContext context)
        //{

        //    var unitOfWork=  ServiceLocator.Instance.GetService<IUnitOfWork>();
        //    if (context.Exception == null)
        //    {
        //        unitOfWork.Commit();
        //    }
        //    base.OnActionExecuted(context);
        //}
        //[DisableAuditing]
        // GET api/values
        [HttpGet]
        public ActionResult<IEnumerable<string>> Get()
        {


            return new string[] { "value1", "value2" };
        }
    }
}